#include <stdio.h>

struct st_a {
    int data;
    void *(*function)();
};

void myfunc1()
{
    printf("this is fun()\n");
    return;
}

int myfunc2(int a)
{
    printf("this is func(%d)\n", a);
    return a;
}

char myfunc3(int a)
{
    printf("this is func(%c)\n", a);
    return a;
}

int main(void)
{
    struct st_a a1;
    a1.function = &myfunc1;
    a1.function();
    a1.function('a');

    a1.function = (void *)myfunc2;
    a1.function();
    a1.function('b');

    a1.function = (void *)myfunc3;
    a1.function();
    a1.function('c');

    return 0;
}
